import { WeaBrowser, WeaSelect } from 'ecCom';
export default class FieldDbType extends React.Component {
    render() {
        const { value = {}, disabled, fieldType } = this.props;
        if (fieldType === '161' || fieldType === '162') {
            return (
                <div className="ant-row">
                    <label>
                        浏览数据
                </label>
                    <WeaBrowser
                        type={'userDefindBrowserType'}
                        replaceDatas={value.valueObj ? value.valueObj : value.value && [{ id: value.value, name: value.valueSpan }]}
                        viewAttr={disabled ? 1 : 3}
                        hasBorder={true}
                    />
                </div>
            )
        } else if (fieldType === '256' || fieldType === '257') {
            return (
                <div className="ant-row">
                    <label>
                        浏览数据
                    </label>
                    <WeaBrowser
                        type={'formmodeTreeData'}
                        replaceDatas={value.valueObj ? value.valueObj : value.value && [{ id: value.value, name: value.valueSpan }]}
                        viewAttr={disabled ? 1 : 3}
                        hasBorder={true}
                    />
                </div>
            )
        } else {
            return null;
        }

    }
}